<?php

namespace App\Validators\Buz;

use Illuminate\Contracts\Validation\Factory;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
use \Prettus\Validator\Contracts\ValidatorInterface;
use \Prettus\Validator\LaravelValidator;

class WithdrawValidator extends LaravelValidator
{


    public function __construct(Factory $validator)
    {
        parent::__construct($validator);
        $this->rules = [
            'create' => [
                'bankid'  => [
                    'required',
                    'exists:plat_user_banks,id,uid,' . Auth::id(),
                ],
                'money' => 'required|min:1',
                'trade_pwd' => 'required|max:32|min:6'
            ],
        ];
    }
}
